import { http } from '@/utils/axios/http'
const api = http.create({ baseURL: process.env.VITE_APP_CIMS_API })
import menuJson from '@/assets/mock/menu.json'
import { LoginDto } from './type'

const getMenuList = () => {
  return menuJson
}

/** 登录 */
const doLogin = (dto: LoginDto) => {
  return api.post('/api/login/doLogin', dto)
}

const logout = () => {
  return api.get('/api/login/logout')
}

export const loginApi = {
  doLogin,
  getMenuList,
  logout
}
